Address Book Data-Binding Object

The Address Book application uses the RDS.DataControl object to bind data from the SQL Server database to a visual object (in this case, a DHTML table) in the application's client HTML page. The event-driven VBScript program logic uses the RDS.DataControl to:

The following code defines the RDS.DataControl component:

<OBJECT classid="clsid:BD96C556-65A3-11D0-983A-00C04FC29E33"
    ID=DC1 Width=1 Height=1>
    <PARAM NAME="SERVER" VALUE="http://<%=Request.ServerVariables("SERVER_NAME")%>">
    <PARAM NAME="CONNECT" VALUE="Provider=sqloledb;
Initial Catalog=AddrBookDb;User ID=adcdemo;Password=adcdemo;">
</OBJECT>

The OBJECT tag defines the RDS.DataControl component in the program. The tag includes two types of parameters:

Generic OBJECT Tag Parameters

The following table describes the parameters associated with the OBJECT tag.

Parameter Description
CLASSID A unique, 128-bit number that identifies the type of embedded object to the system. This identifier is maintained in the local computer's system registry. (For the class IDs of the RDS.DataControl object, see RDS.DataControl Object.)
ID Defines a document-wide identifier for the embedded object that is used to identify it in code.

RDS.DataControl Tag Parameters

The following table describes the parameters specific to the RDS.DataControl object. (For a complete list of the RDS.DataControl object parameters, and when to implement them, see RDS.DataControl object.)

Parameter Description
SERVER If you are using HTTP, the value is the name of the server computer preceded by HTTP://.
CONNECT Provides the necessary connection information for the RDS.DataControl to connect to SQL Server.
SQL Sets or returns the query string used to retrieve the Recordset.

Next   Address Book Command Buttons